# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapyaudio
pkgver=0.1.1
_pkgname=SoapyAudio
_gitver=soapy-audio-$pkgver
pkgrel=3
pkgdesc='Soapy SDR plugin for Audio devices'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyAudio'
license=('GPL3')
depends=('soapysdr' 'rtaudio' 'hamlib')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('de0b8d653b71a8927265828549bef6b655dc10146270fc8c49f30004ec2dbf52d8fb0dd6dbbf9cf3d2c7bfb47df66c60d57943d9b0f7c2e16ec5c8db52426a0b')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

